local bingxin = fk.CreateSkill{
  name = "mod__bingxin"
}
local bingxin_ = {
  name = "mod__bingxin",
  pattern = "^nullification|.|.|.|.|basic|.",
  interaction = function()
    local names = {}
    local mark = Self:getMark("mod__bingxin-turn")
    for _, id in ipairs(Fk:getAllCardIds()) do
      local card = Fk:getCardById(id)
      if card.type == Card.TypeBasic and
        ((Fk.currentResponsePattern == nil and Self:canUse(card)) or
        (Fk.currentResponsePattern and Exppattern:Parse(Fk.currentResponsePattern):match(card))) then
        if mark == 0 or (not table.contains(mark, card.trueName)) then
          table.insertIfNeed(names, card.name)
        end
      end
    end
    if #names == 0 then return end
    return UI.ComboBox {choices = names}
  end,
  card_filter = Util.FalseFunc,
  view_as = function(self, cards)
    if not self.interaction.data then return end
    local card = Fk:cloneCard(self.interaction.data)
    card.skillName = self.name
    return card
  end,
  before_use = function(self, player, use)
    local mark = player:getMark("mod__bingxin-turn")
    if mark == 0 then mark = {} end
    table.insert(mark, Fk:cloneCard(self.interaction.data).trueName)
    player.room:setPlayerMark(player, "mod__bingxin-turn", mark)
    if #player:getCardIds(Player.Hand) > 0 then
      local cards = player:getCardIds(Player.Hand)
      if not table.every(cards, function(id) 
        return Fk:getCardById(id).color ==Fk:getCardById(cards[1]).color 
      end) then
        player.room:setPlayerMark(player, "@@mod__bingxin_prohibit-turn", 1)
      end
    end
    player:drawCards(1, self.name)
  end,
  enabled_at_play = function(self, player)
    local cards = player.player_cards[Player.Hand]
    return #cards == player.hp and player:getMark("@@mod__bingxin_prohibit-turn") == 0
  end,
  enabled_at_response = function(self, player, response)
    local cards = player.player_cards[Player.Hand]
    return not response and #cards == player.hp and player:getMark("@@mod__bingxin_prohibit-turn") == 0
  end,
}
bingxin:addEffect("viewas", bingxin_)
return bingxin